package com.xr.system.student.task;

import com.xr.system.model.student.pojo.Student;
import com.xr.system.student.service.IStudentService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Component
public class StudentTask {

    @Resource
    private IStudentService iStudentService;

    @XxlJob("studentJobHandler")
    public void testStudentTask() {
        List<Student> list = iStudentService.list();
        log.info("当前时间戳<{}>，{}", System.currentTimeMillis(), list);
    }

}
